using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;

namespace PlanningPoker.Model
{
    [ActiveRecord]
    public class CardTable : ActiveRecordBase
    {

        private int _id;
        private IList<CardPlayer> _players = new System.Collections.Generic.List<CardPlayer>();

        [PrimaryKey]
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        private string _name;

        [Property]
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        [HasMany(typeof(CardPlayer),Lazy=true, Table=CardPlayer.tablename , ColumnKey="CurrentTableId")]
        public IList<CardPlayer> CardPlayers
        {
            get { return _players; }
            set { _players = value; }
            
        }



        

    }
}
